/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.perlak.filters.duplication;

import com.perlak.filesearch.SingleFileResult;
import com.perlak.filters.IFilteredItem;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Mateusz
 */
public class Duplication implements IFilteredItem {

    private List<SingleFileResult> files = new ArrayList<SingleFileResult>();

    public void AddDuplicatedFile(SingleFileResult file) {
        if (file != null) {
            files.add(file);
        }
    }

    @Override
    public SingleFileResult getFilteredItem() {
        if (files.size() > 0) {
            return files.get(0);
        } else {
            return null;
        }
    }

    @Override
    public List<SingleFileResult> getListOfFilteredItems() {
        return files;
    }
}
